<?php
class NewFriendsVo extends SzAbstractMySqlVo
{

    private $userId;
    private $friendId;
    private $isNew;
    private $inviteId;
    private $isGetInviteReward;
    private $marking;
    private $markingTime;
    private $stealNum;
    private $stealTime;

    /**
     * Initialize NewFriendsVo.
     *
     * @param $userId
     * @param $friendId
     * @param $isNew
     * @param $inviteId
     * @param $isGetInviteReward
     * @param $marking
     * @param $markingTime
     * @param $stealNum
     * @param $stealTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return NewFriendsVo
     */
    public function __construct($userId, $friendId, $isNew, $inviteId, $isGetInviteReward, $marking = 0, $markingTime = 0, $stealNum = 0, $stealTime = 0, $isInsert = false) {
        $this->userId = $userId;
        $this->friendId = $friendId;
        $this->isNew = $isNew;
        $this->inviteId = $inviteId;
        $this->isGetInviteReward = $isGetInviteReward;
        $this->marking = $marking;
        $this->markingTime = $markingTime;
        $this->stealNum = $stealNum;
        $this->stealTime = $stealTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'NewFriendsVo';
        $this->ormName = 'NewFriends';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'friendId' => $this->getFriendId(),
            'isNew' => $this->getIsNew(),
            'inviteId' => $this->getInviteId(),
            'isGetInviteReward' => $this->getIsGetInviteReward(),
            'marking' => $this->getMarking(),
            'markingTime' => $this->getMarkingTime(),
            'stealNum' => $this->getStealNum(),
            'stealTime' => $this->getStealTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'friendId' => $this->getFriendId(),
            'isNew' => $this->getIsNew(),
            'inviteId' => $this->getInviteId(),
            'isGetInviteReward' => $this->getIsGetInviteReward(),
            'marking' => $this->getMarking(),
            'markingTime' => $this->getMarkingTime(),
            'stealNum' => $this->getStealNum(),
            'stealTime' => $this->getStealTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getFriendId(),
            $this->getIsNew(),
            $this->getInviteId(),
            $this->getIsGetInviteReward(),
            $this->getMarking(),
            $this->getMarkingTime(),
            $this->getStealNum(),
            $this->getStealTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getFriendId()
    {
        return $this->friendId;
    }

    public function setFriendId($val)
    {
        $this->saveColumnStatus(1, $this->friendId);
        $this->friendId = $val;
    }

    public function getIsNew()
    {
        return $this->isNew;
    }

    public function setIsNew($val)
    {
        $this->saveColumnStatus(2, $this->isNew);
        $this->isNew = $val;
    }

    public function getInviteId()
    {
        return $this->inviteId;
    }

    public function setInviteId($val)
    {
        $this->saveColumnStatus(3, $this->inviteId);
        $this->inviteId = $val;
    }

    public function getIsGetInviteReward()
    {
        return $this->isGetInviteReward;
    }

    public function setIsGetInviteReward($val)
    {
        $this->saveColumnStatus(4, $this->isGetInviteReward);
        $this->isGetInviteReward = $val;
    }

    public function getMarking()
    {
        return $this->marking;
    }

    public function setMarking($val)
    {
        $this->saveColumnStatus(5, $this->marking);
        $this->marking = $val;
    }

    public function getMarkingTime()
    {
        return $this->markingTime;
    }

    public function setMarkingTime($val)
    {
        $this->saveColumnStatus(6, $this->markingTime);
        $this->markingTime = $val;
    }

    public function getStealNum()
    {
        return $this->stealNum;
    }

    public function setStealNum($val)
    {
        $this->saveColumnStatus(7, $this->stealNum);
        $this->stealNum = $val;
    }

    public function getStealTime()
    {
        return $this->stealTime;
    }

    public function setStealTime($val)
    {
        $this->saveColumnStatus(8, $this->stealTime);
        $this->stealTime = $val;
    }

    public function updateStealNum($val)
    {
        $this->saveColumnStatus(7, $this->stealNum);
        $this->stealNum += $val;
    }

}